home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 January: Mac OS SDK / Dev.CD Jan 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / CIncludes / CMAcceleration.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-17  |  4.1 KB  |  142 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        CMAcceleration.h
  3.  
  4.      Contains:    ColorSync Acceleration Component API
  5.  
  6.      Version:    Technology:    ColorSync 2.0
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1995-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __CMACCELERATION__
  18. #define __CMACCELERATION__
  19.  
  20. #ifndef __COMPONENTS__
  21. #include <Components.h>
  22. #endif
  23. #ifndef __CMAPPLICATION__
  24. #include <CMApplication.h>
  25. #endif
  26.  
  27.  
  28.  
  29. #if PRAGMA_ONCE
  30. #pragma once
  31. #endif
  32.  
  33. #ifdef __cplusplus
  34. extern "C" {
  35. #endif
  36.  
  37. #if PRAGMA_IMPORT
  38. #pragma import on
  39. #endif
  40.  
  41. #if PRAGMA_STRUCT_ALIGN
  42.     #pragma options align=mac68k
  43. #elif PRAGMA_STRUCT_PACKPUSH
  44.     #pragma pack(push, 2)
  45. #elif PRAGMA_STRUCT_PACK
  46.     #pragma pack(2)
  47. #endif
  48.  
  49. /* –––––––––––––––––––––––––––––––––––––– version info */
  50.  
  51. enum {
  52.     cmAccelerationInterfaceVersion = 1
  53. };
  54.  
  55. /* –––––––––––––––––––––––––––––––––––––– Component Type */
  56.  
  57. enum {
  58.     cmAccelerationComponentType    = FOUR_CHAR_CODE('csac')
  59. };
  60.  
  61. /* –––––––––––––––––––––––––––––––––––––– Required Component function selectors */
  62.  
  63. enum {
  64.     cmLoadTables                = 0,
  65.     cmCalculateData                = 1
  66. };
  67.  
  68. /* –––––––––––––––––––––––––––––––––––––– table data for acceleration component */
  69.  
  70. struct CMAccelerationTableData {
  71.     long                             inputLutEntryCount;            /* count of entries for input lut for one dimension*/
  72.     long                             inputLutWordSize;            /* count of bits of each entry ( e.g. 16 for WORD )*/
  73.     Handle                             inputLut;                    /* handle to input lut*/
  74.     long                             outputLutEntryCount;        /* count of entries for output lut for one dimension    */
  75.     long                             outputLutWordSize;            /* count of bits of each entry ( e.g. 8 for BYTE )*/
  76.     Handle                             outputLut;                    /* handle to output lut*/
  77.     long                             colorLutInDim;                /* input dimension  ( e.g. 3 for LAB ; 4 for CMYK )*/
  78.     long                             colorLutOutDim;                /* output dimension ( e.g. 3 for LAB ; 4 for CMYK )*/
  79.     long                             colorLutGridPoints;            /* count of gridpoints for color lut ( for one Dimension )    */
  80.     long                             colorLutWordSize;            /* count of bits of each entry ( e.g. 8 for BYTE )*/
  81.     Handle                             colorLut;                    /* handle to color lut*/
  82.     CMBitmapColorSpace                 inputColorSpace;            /* packing info for input*/
  83.     CMBitmapColorSpace                 outputColorSpace;            /* packing info for output*/
  84.     void *                            userData;
  85.     unsigned long                     reserved1;
  86.     unsigned long                     reserved2;
  87.     unsigned long                     reserved3;
  88.     unsigned long                     reserved4;
  89.     unsigned long                     reserved5;
  90. };
  91. typedef struct CMAccelerationTableData    CMAccelerationTableData;
  92. typedef CMAccelerationTableData *        CMAccelerationTableDataPtr;
  93. typedef CMAccelerationTableDataPtr *    CMAccelerationTableDataHdl;
  94. /* –––––––––––––––––––––––––––––––––––––– calc data for acceleration component */
  95.  
  96. struct CMAccelerationCalcData {
  97.     long                             pixelCount;                    /* count of input pixels*/
  98.     Ptr                             inputData;                    /* input array*/
  99.     Ptr                             outputData;                    /* output array*/
  100.     unsigned long                     reserved1;
  101.     unsigned long                     reserved2;
  102. };
  103. typedef struct CMAccelerationCalcData    CMAccelerationCalcData;
  104. typedef CMAccelerationCalcData *        CMAccelerationCalcDataPtr;
  105. typedef CMAccelerationCalcDataPtr *        CMAccelerationCalcDataHdl;
  106. /*
  107.    ———————————————————————————————————————————————————————————————————————————————————————————————— 
  108.                   A c c e l e r a t i o n   C o m p o n e n t   I n t e r f a c e s
  109.    ———————————————————————————————————————————————————————————————————————————————————————————————— 
  110. */
  111. EXTERN_API( CMError )
  112. CMAccelerationLoadTables        (ComponentInstance         CMSession,
  113.                                  CMAccelerationTableDataPtr  tableData)                        FIVEWORDINLINE(0x2F3C, 0x0004, 0x0000, 0x7000, 0xA82A);
  114.  
  115.  
  116. EXTERN_API( CMError )
  117. CMAccelerationCalculateData        (ComponentInstance         CMSession,
  118.                                  CMAccelerationCalcDataPtr  calcData)                        FIVEWORDINLINE(0x2F3C, 0x0004, 0x0001, 0x7000, 0xA82A);
  119.  
  120.  
  121.  
  122. #if PRAGMA_STRUCT_ALIGN
  123.     #pragma options align=reset
  124. #elif PRAGMA_STRUCT_PACKPUSH
  125.     #pragma pack(pop)
  126. #elif PRAGMA_STRUCT_PACK
  127.     #pragma pack()
  128. #endif
  129.  
  130. #ifdef PRAGMA_IMPORT_OFF
  131. #pragma import off
  132. #elif PRAGMA_IMPORT
  133. #pragma import reset
  134. #endif
  135.  
  136. #ifdef __cplusplus
  137. }
  138. #endif
  139.  
  140. #endif /* __CMACCELERATION__ */
  141.  
  142.